package view;

import java.io.File;

import javax.swing.filechooser.FileFilter;

import common.Utils;

public class imgFilter extends FileFilter
{

	@Override
	public boolean accept(File f) 
	{
		String ext = "";
		String name = f.getName();
		int i = name.lastIndexOf('.');
		
		if (i == -1)
			return false;
		
		ext = name.substring(i);
		
		if (ext.equals(Utils.IMG_EXT))
			return true;
		
		return false;
	}

	@Override
	public String getDescription() {
		
		return "Image *.txt";
	}
	
	
}